package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-07-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("douyin_goods_exchange_setting")
@ApiModel(value="DouyinGoodsExchangeSettingEntity对象", description="")
public class DouyinGoodsExchangeSettingEntity implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商品id")
    private String productId;
    
    @ApiModelProperty(value = "SKU id")
    private String skuId;
    
    @ApiModelProperty(value = "优惠券 id")
    private Long couponId;

    @ApiModelProperty(value = "数量")
    private Integer number;

    @ApiModelProperty(value = "有效时长")
    private Integer effectiveDuration;

    private Long cinemaId;

    private Long tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;

    @TableField(exist = false)
    public CouponEntity coupon;
    
    public DouyinGoodsExchangeSettingEntity() {
    }
    
    public DouyinGoodsExchangeSettingEntity(String productId, String skuId, Long couponId, Integer number) {
        this.productId = productId;
        this.skuId = skuId;
        this.couponId = couponId;
        this.number = number;
    }
}
